import TableTypes from "../../../model/TableTypes.ts";


const Header = (props: { type: TableTypes }) => {

    const {type} = props

    switch (type) {
        case TableTypes.BOOKS:
            return (
                <tr>
                    <th scope="col">#</th>
                    <th scope="col">Book ID</th>
                    <th scope="col">Category ID</th>
                    <th scope="col">Stack ID</th>
                    <th scope="col">Owner</th>
                    <th scope="col">Condition</th>
                    <th scope="col">Fee</th>
                    <th scope="col">Price</th>
                    <th scope="col">Status</th>
                </tr>
            )

        case TableTypes.USERS:
            return (
                <tr>
                    <th scope="col">#</th>
                    <th scope="col">User ID</th>
                    <th scope="col">Password</th>
                    <th scope="col">Type</th>
                    <th scope="col">Borrow Limit</th>
                    <th scope="col">First Name</th>
                    <th scope="col">Last Name</th>
                    <th scope="col">Email</th>
                    <th scope="col">Address</th>
                </tr>
            )
        case TableTypes.MANAGERS:
            return (
                <>

                </>
            )

        case TableTypes.STACKS:
            return (
                    <tr>
                        <th scope="col">Stack ID</th>
                        <th scope="col">Category ID</th>
                        <th scope="col">Title</th>
                        <th scope="col">Description</th>
                        <th scope="col">Author</th>
                        <th scope="col">Status</th>
                        <th scope="col">Quantity</th>
                        <th scope="col">Image</th>
                        <th scope="col">Edit</th>
                    </tr>
            )

        case TableTypes.ORDERS:
            return (
                <tr>
                    <th scope="col">Order ID</th>
                    <th scope="col">User ID</th>
                    <th scope="col">Date Created</th>
                    <th scope="col">Status</th>
                    <th scope="col">Quantity</th>
                    <th scope="col">Class</th>
                    <th scope="col">Expiration Date</th>
                    <th scope="col">Edit</th>
                </tr>
            )

        default:
            throw new Error("the passed type is not a Table Type")
    }

}

export default Header